Optimal. Leaf size=292 \[ -\frac {(-1)^{3/4} a^{5/2} (46 A-45 i B) \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{8 d}-\frac {(4+4 i) a^{5/2} (A-i B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (18 i A+19 B) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.70, antiderivative size = 292, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 10, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {4326, 3675,
3678, 3682, 3625, 211, 3680, 65, 223, 209} \begin {gather*} -\frac {(-1)^{3/4} a^{5/2} (46 A-45 i B) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{8 d}-\frac {(4+4 i) a^{5/2} (A-i B) \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (19 B+18 i A) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 211
Rule 223
Rule 3625
Rule 3675
Rule 3678
Rule 3680
Rule 3682
Rule 4326
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x))}{\sqrt {\cot (c+d x)}} \, dx &=\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \, dx\\ &=\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {1}{3} \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \sqrt {\tan (c+d x)} (a+i a \tan (c+d x))^{3/2} \left (\frac {3}{2} a (2 A-i B)+\frac {3}{2} a (2 i A+3 B) \tan (c+d x)\right ) \, dx\\ &=-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {1}{6} \left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)} \left (\frac {3}{4} a^2 (14 A-13 i B)+\frac {3}{4} a^2 (18 i A+19 B) \tan (c+d x)\right ) \, dx\\ &=-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (18 i A+19 B) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {\left (\sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)} \left (-\frac {3}{8} a^3 (18 i A+19 B)+\frac {3}{8} a^3 (46 A-45 i B) \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx}{6 a}\\ &=-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (18 i A+19 B) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}-\left (4 a^2 (i A+B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx+\frac {1}{16} \left (a (46 i A+45 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \int \frac {(a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (18 i A+19 B) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {\left (8 i a^4 (i A+B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}+\frac {\left (a^3 (46 i A+45 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{16 d}\\ &=-\frac {(4-4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (18 i A+19 B) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {\left (a^3 (46 i A+45 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{8 d}\\ &=-\frac {(4-4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (18 i A+19 B) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {\left (a^3 (46 i A+45 B) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{1-i a x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{8 d}\\ &=-\frac {\sqrt [4]{-1} a^{5/2} (46 i A+45 B) \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{8 d}-\frac {(4-4 i) a^{5/2} (i A+B) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d}-\frac {a^2 (2 A-3 i B) \sqrt {a+i a \tan (c+d x)}}{4 d \cot ^{\frac {3}{2}}(c+d x)}+\frac {a^2 (18 i A+19 B) \sqrt {a+i a \tan (c+d x)}}{8 d \sqrt {\cot (c+d x)}}+\frac {i a B (a+i a \tan (c+d x))^{3/2}}{3 d \cot ^{\frac {3}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 5.97, size = 484, normalized size = 1.66 \begin {gather*} \frac {\cos ^3(c+d x) \sqrt {\cot (c+d x)} (a+i a \tan (c+d x))^{5/2} (A+B \tan (c+d x)) \left (-\sqrt {2} \left (\sqrt {2} (46 A-45 i B) \log \left (\frac {2 e^{\frac {7 i c}{2}} \left (\sqrt {2}-i \sqrt {2} e^{i (c+d x)}+2 i \sqrt {-1+e^{2 i (c+d x)}}\right )}{(46 A-45 i B) \left (-i+e^{i (c+d x)}\right )}\right )+\sqrt {2} (-46 A+45 i B) \log \left (\frac {2 e^{\frac {7 i c}{2}} \left (-i \sqrt {2}+\sqrt {2} e^{i (c+d x)}+2 \sqrt {-1+e^{2 i (c+d x)}}\right )}{(46 i A+45 B) \left (i+e^{i (c+d x)}\right )}\right )+128 (A-i B) \log \left ((\cos (c)-i \sin (c)) \left (\cos (c+d x)+i \sin (c+d x)+\sqrt {-1+\cos (2 (c+d x))+i \sin (2 (c+d x))}\right )\right )\right ) \sqrt {i (i+\cot (c+d x)) \sin ^2(c+d x)} (\cos (3 c+d x)-i \sin (3 c+d x))+\frac {2}{3} \sec ^2(c+d x) (\cos (2 c)-i \sin (2 c)) (54 i A+49 B+(54 i A+65 B) \cos (2 (c+d x))+(-12 A+26 i B) \sin (2 (c+d x))) \tan (c+d x)\right )}{32 d (\cos (d x)+i \sin (d x))^2 (A \cos (c+d x)+B \sin (c+d x))} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 4850 vs. \(2 (234 ) = 468\).
time = 69.05, size = 4851, normalized size = 16.61
method | result | size |
default | \(\text {Expression too large to display}\) | \(4851\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 1013 vs. \(2 (220) = 440\).
time = 0.66, size = 1013, normalized size = 3.47 \begin {gather*} -\frac {192 \, \sqrt {2} \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} - \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (i \, d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) - 192 \, \sqrt {2} \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {4 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (i \, d x + i \, c\right )} - \sqrt {-\frac {{\left (-i \, A^{2} - 2 \, A B + i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (-i \, d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{{\left (-i \, A - B\right )} a^{2}}\right ) - 4 \, \sqrt {2} {\left ({\left (66 \, A - 91 i \, B\right )} a^{2} e^{\left (7 i \, d x + 7 i \, c\right )} + 7 \, {\left (6 \, A - i \, B\right )} a^{2} e^{\left (5 i \, d x + 5 i \, c\right )} - {\left (66 \, A - 59 i \, B\right )} a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} - 3 \, {\left (14 \, A - 13 i \, B\right )} a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}} - 3 \, \sqrt {\frac {{\left (2116 i \, A^{2} + 4140 \, A B - 2025 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {16 \, {\left (3 \, {\left (46 i \, A + 45 \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-46 i \, A - 45 \, B\right )} a^{3} + 2 \, \sqrt {2} \sqrt {\frac {{\left (2116 i \, A^{2} + 4140 \, A B - 2025 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} - d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (46 i \, A + 45 \, B\right )} a}\right ) + 3 \, \sqrt {\frac {{\left (2116 i \, A^{2} + 4140 \, A B - 2025 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (-\frac {16 \, {\left (3 \, {\left (46 i \, A + 45 \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-46 i \, A - 45 \, B\right )} a^{3} - 2 \, \sqrt {2} \sqrt {\frac {{\left (2116 i \, A^{2} + 4140 \, A B - 2025 i \, B^{2}\right )} a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} - d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{{\left (46 i \, A + 45 \, B\right )} a}\right )}{96 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}{\sqrt {\mathrm {cot}\left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________